<template>
    <!-- 顶部广告 -->
    <!-- <div>
      <van-image
        height="52"
        src="https://yanxuan.nosdn.127.net/static-union/16607924415e76bf.png?type=webp&imageView&thumbnail=750x0&quality=75"
      />
    </div> -->

    <!-- 头部 -->
    <div class="header">
      <div>
        <van-icon @click="toHome" name="wap-home-o" />
      </div>
      <div class="headerLogo">
        <van-image
          width="86"
          height="30"
          src="./src/assets/images/logo1.png"
        />
      </div>
      <div class="search">
        <van-icon @click="toSearch" name="search" />
        <van-icon name="cart-o" />
      </div>
    </div>
</template>

<script lang="ts" setup>
import { useRouter } from 'vue-router';


const router = useRouter()

const toHome = () => {
  router.push('/home')
}


const toSearch = () => {
  router.push('/search')
}

</script>

<script lang="ts">
export default {
  name: 'Header'
}
</script>

<style lang="scss" scoped>
.header{ 
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px; 
    height: 44px;
    font-size: 30px;
    border-bottom: 1px solid #ddd;
    background-color: white;
    .headerLogo{
      width:86px;
      height:30px;
    }
    .search{
      width:74px;
      height: 32px;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
  }
</style>
